<import src="../../wxParse/wxParse.wxml"/> 
<wxs src="../../utils/common.wxs" module="filter" />
<view class='floatView' wx:if='{{type}}'>
    <image class="edit" src="../../image/to-home.png" bindtap="turnPage"/>
  <!--   <button open-type='share' class="share">
        <image mode='' src="../../image/shequ/share.png" />
    </button> -->
</view>

<toast wx:if='{{showToast}}' bindloginSuccess="onLoginSuccess" bindcannel='onCannel'></toast>
<!-- 话题 -->
<wxs src="../../utils/common.wxs" module="filter" />
<view class='bbs'>
	<view class='item' >
		<view class='info'>
			<image class="image" src="{{obj.wxUser.avatarUrl}}" />
			<view  wx:if='{{obj.browseNum<10}}' class='name'>{{obj.wxUser.nickName}}<image src="../../image/shequ/hot.png" /></view>
			<view wx:if='{{9<obj.browseNum&&obj.browseNum<51}}' class='name'>{{obj.wxUser.nickName}}<image  src="../../image/shequ/hot.png" /><image src="../../image/shequ/hot.png" /></view>
			<view wx:if='{{obj.browseNum>51}}' class='name'>{{obj.wxUser.nickName}}<image src="../../image/shequ/hot.png" /><image src="../../image/shequ/hot.png" /><image src="../../image/shequ/hot.png" /></view>
			<view class='time'>{{filter.flitTime(obj.updated)}} {{obj.city}}<span class="label">#{{obj.hotTopicTypeName}}</span></view>
			<view wx:if='{{atttionShow}}' class="guanzhu" bindtap="attionTap">已收藏</view>
			<view  wx:else  class="guanzhu_no" bindtap="attionTap">+ 收藏</view>
		</view>
		<view class='title'>{{obj.title}}</view>
		<!-- <text class='content'>{{obj.content}}</text> -->
		<view>
		  <template is="wxParse" data="{{wxParseData:article.nodes}}"/>
		</view>
		<view class='image-list'>
			<image  wx:for="{{obj.wxArticlesPic}}" class="image" src="{{item.url}}" />
		</view>
		<view class='nums'>
			<view><image class="image" src="../../image/shequ/browse.png" /><span>{{obj.browseNum}}</span></view>
			<view><image class="image" src="../../image/shequ/comment.png" /><span>{{obj.commentNum}}</span></view>
			<view  wx:if='{{obj.isLikes==0}}'><image bindtap="dianzanM" data-code='{{obj.id}}'  class="image"  src="../../image/shequ/fabulous.png" /><span>{{obj.likesNum}}</span></view>
			<view  wx:if='{{obj.isLikes==1}}'><image bindtap="dianzanF" data-code='{{obj.id}}'  class="image"  src="../../image/shequ/fabulous_hover.png" /><span>{{obj.likesNum}}</span></view>

		</view>
		<view class='noteTitle'>全部评论({{commentItem.total}})
            <image class="edit" wx:if='{{!type}}' src="../../image/shequ/publish_posts.png" bindtap="turnPage"/>
            
		</view>
		<view wx:if="{{commentItem.list.length!==0}}" wx:for="{{commentItem.list}}">
			<view class='owner'>
				<image class="image" src="{{item.wxUser.avatarUrl}}" />
				<view class='note'><span>{{item.wxUser.nickName}}<text>{{item.created}}</text></span>{{item.content}}</view>
				<view class='huifu' bindtap="replyTap"  data-index="{{index}}" data-id="{{item.id}}">回复</view>
				<view wx:if='{{userInfo.openid==item.wxUser.openid}}' class='huifu_detele' bindtap="replydeteleTap"  data-index="{{index}}" data-id="{{item.id}}">删除</view>
			</view>
			<view class="huifu_input" wx:if="{{replynum == index}}">
				<input bindinput="replyInput" placeholder="回复内容" />
				<button  bindtap="replyBtnTap">提交</button>
			</view>
			<view class='speakList' wx:if="{{item.list.length >0}}">
				<view class='speakItem' wx:for="{{item.list}}" wx:for-item="itemN">
					<image class="image" src="{{itemN.wxUser.avatarUrl}}" />
					<view class='note'><view><span>{{itemN.wxUser.nickName}}:</span><span class="delete_comm" bindtap="delcommentTap" data-id="{{itemN.id}}" wx:if='{{userInfo.openid==itemN.wxUser.openid}}'>删除</span> </view>
					{{itemN.content}}</view>
				</view>		
			</view>
		</view>
	</view>
	<view style='height: 100rpx;'></view>
	<view class='speak'>
		<image class="image1" src="../../image/shequ/write.png" />
		 <input bindinput="bindTextAreaBlur"  placeholder-style='color:#c3c3c3' placeholder-class="placeholder_h"  maxlength="100" placeholder="请输入内容" value='{{textareaVal}}' />
		<label bindtap="publishTap">发表</label> 
		<button open-type='share' class="share_input" >
			<image class="image3"  src="../../image/shequ/fenx.png" />
		</button>
	</view>
</view>